cmake_minimum_required(VERSION 2.6)
project(ukui-biometric-auth)

find_package(Qt5 COMPONENTS Core Widgets DBus Svg)
find_package(Qt5LinguistTools)
find_package(OpenCV REQUIRED)
find_package(PkgConfig)
pkg_check_modules(GIOUNIX2 REQUIRED gio-unix-2.0)
pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0)

set(UKUI_BIOMETRIC_DIR /usr/share/ukui-biometric)
set(CMAKE_INSTALL_PREFIX /usr)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set (CONDOR_SCRIPT_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE
    GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

add_compile_options(-fPIC)
add_definitions(-DUKUI_BIOMETRIC=${UKUI_BIOMETRIC_DIR})
add_definitions(-DCONFIG_FILE=/etc/biometric-auth/ukui-biometric.conf)


add_subdirectory(bioauth)
add_subdirectory(bioauth-bin)
add_subdirectory(pam-biometric)
add_subdirectory(polkit-agent)
add_subdirectory(images)

add_dependencies(bioauth BioAuth)
add_dependencies(polkit-ukui-authentication-agent-1 BioAuthWidgets)
